package com.woniu.order.feign;

import com.woniu.entity.Result;
import com.woniu.order.pojo.Order;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

@FeignClient(value = "order-service", path = "/order")
public interface OrderFeignClient {

    @PostMapping("/select/{username}")
    public Result<List<Order>> selectOrderListByUsername(@PathVariable("username") String username);

    @PostMapping("/select/{orderNo}/{username}")
    public Result<Order> selectOrderByOrderNOAndUsername(@PathVariable("orderNo") String orderNo, @PathVariable("username") String username);
}
